From: Jasper St. Pierre Date: Thu, 24 Mar 2011 11:11:17 +0000 (-0400) Subject: telepathyClient: give a separate style to TpLogger messages X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8424 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f117d9bfd39a6692d402af3227f92684b3a6dc53;p=gnome-shell.git telepathyClient: give a separate style to TpLogger messages Sometimes, log messages are hard to differentiate from normal, unread recent messages, so give a separate style to messages retrieved from the TelepathyLogger service. https://bugzilla.gnome.org/show_bug.cgi?id=645609 --- diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index e9aefb15a..204505381 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -1100,6 +1100,10 @@ StTooltip StLabel { icon-size: 36px; } +.chat-log-message { + color: #888888; +} + .chat-received { background-gradient-direction: horizontal; background-gradient-start: rgba(255, 255, 255, 0.2); diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js index cc653e7fd..0b33e8602 100644 --- a/js/ui/telepathyClient.js +++ b/js/ui/telepathyClient.js @@ -267,7 +267,7 @@ Source.prototype = { if (!isPending) { showTimestamp = true; - this._notification.appendMessage(logMessage, true); + this._notification.appendMessage(logMessage, true, ['chat-log-message']); } } @@ -403,10 +403,12 @@ Notification.prototype = { * @noTimestamp: Whether to add a timestamp. If %true, no timestamp * will be added, regardless of the difference since the * last timestamp + * @styles: A list of CSS class names. */ - appendMessage: function(message, noTimestamp) { + appendMessage: function(message, noTimestamp, styles) { let messageBody = GLib.markup_escape_text(message.text, -1); - let styles = [message.direction]; + styles = styles || []; + styles.push(message.direction); if (message.messageType == Tp.ChannelTextMessageType.ACTION) { let senderAlias = GLib.markup_escape_text(message.sender, -1);